package com.dgshanger.sanhxiaofeisc.ui.home.utils;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.RelativeLayout;

/**
 * Created by JacobHHH on 2018/5/9.
 */

public class MyRelativeLayout extends RelativeLayout {
    public MyRelativeLayout(Context context) {
        super(context);
    }

    public MyRelativeLayout(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public MyRelativeLayout(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }





    private float startY;
    private float moveY;
    @Override
    public boolean onTouchEvent(MotionEvent event) {
       /* switch (event.getAction()){
            case MotionEvent.ACTION_DOWN:
                Log.e("Tag","ACTION_DOWN");
                startY=event.getY();
                break;
            case MotionEvent.ACTION_MOVE:
                Log.e("Tag","ACTION_MOVE");

            case MotionEvent.ACTION_UP:
                Log.e("Tag","ACTION_UP");

        }*/
        return super.onTouchEvent(event);
    }

    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        //Log.e("Tag","onInterceptTouchEvent");
        return super.onInterceptTouchEvent(ev);
    }



    private OnRlClickListener mOnRlClickListener;

    public interface OnRlClickListener{
        void onRlClick();
    }

    public void setOnRlClickListener(OnRlClickListener listener){
        mOnRlClickListener=listener;
    }
}
